﻿using System;
using System.Collections.Generic;
using System.Text;

namespace MyTestRunner.Infrastructure
{
    /// <summary>
    /// Contains helper methods for working with enumerables.
    /// </summary>
    public static class EnumerableHelper
    {
        /// <summary>
        /// Verifies that the enumerable has atleast one element.
        /// </summary>
        public static bool HasAtleastOneElement<T>(IEnumerable<T> enumerable)
        {
            foreach (T element in enumerable)
            {
                return true;
            }

            return false;
        }
    }
}
